package com.kaf.ai.dto;

import lombok.Data;

@Data
public class AiResponse {
    private String content;
    private String model;
    private Long timestamp;
    private String provider;
    private Boolean success;
    private String errorMessage;

    public static AiResponse success(String content, String model, String provider) {
        AiResponse res = new AiResponse();
        res.setContent(content);
        res.setModel(model);
        res.setProvider(provider);
        res.setSuccess(true);
        res.setTimestamp(System.currentTimeMillis());
        return res;
    }

    public static AiResponse error(String msg, String provider) {
        AiResponse res = new AiResponse();
        res.setErrorMessage(msg);
        res.setProvider(provider);
        res.setSuccess(false);
        res.setTimestamp(System.currentTimeMillis());
        return res;
    }
}